*{
    /* 初始化 */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    /* 100%窗口宽高 */
    min-height: 100vh;
    /* 弹性布局 水平+垂直居中 */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #eff5ff;
}
.container ul{
    list-style: none;
    text-align: center;
}
.container li{
    width: 320px;
    height: 320px;
    display: inline-block;
    margin: 5px;
    text-align: left;
    position: relative;
}
.container li img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: relative;
    z-index: 10;
    /* 设置transform的过渡 */
    transition: transform 0.35s;
}
/* 文本层 */
.container li .text{
    width: 100%;
    height: 100%;
    background-color: #2c3f52;
    color: #b7ccde;
    position: absolute;
    left: 0;
    top: 0;
    padding: 20px;
    /* 默认缩小0.7倍、不透明度为0 */
    transform: scale(0.7);
    opacity: 0;
    /* 设置过渡 */
    transition: 0.35s;
}
.container li h3{
    color: #fff;
}
.container li a{
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: #2b80ae;
    color: #fff;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 2px;
}
/* 悬停时图片变化 */
.container li:hover img{
    transform: scale(0.45);
    border-radius: 50%;
    border: 15px solid rgba(255,255,255,0.25);
}
/* 悬停时文本层变化 */
.container li:hover .text{
    transform: scale(1);
    opacity: 1;
}